﻿using System;
using System.Web;
using Hematology.HmtMembership;
using Hematology.Tools;
using NgoResource = Hematology.UserSite.App_GlobalResources.UserSite;

namespace Hematology.UserSite.Controls
{
	public class NgoPage : System.Web.UI.Page
	{
		protected override void OnLoad(EventArgs e)
		{
			base.OnLoad(e);

			if (SiteMap.CurrentNode != null)
			{
				Page.Title = String.Format("{0} - {1}", NgoResource.resNgo , SiteMapHelper.GetCurrentNode(SiteMap.CurrentNode).Title);
			}

			if (!MembershipHelper.MembershipService.IsAuthorizedRequest && Page.User.Identity.IsAuthenticated)
			{
				MembershipHelper.FormsService.SignOut();
			}
		}
	}
}